package entity;

import javax.persistence.Column;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.DiscriminatorType;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;


@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(discriminatorType = DiscriminatorType.STRING)
@DiscriminatorValue("TRAIN")
public class Train extends ModeTransport {
	private String type;

	public String toString() {
		return "[" + id + ", " + libelle + ", " + type + "]";
	}

	public Train() {
		super();
	}

	public Train(String libelle, String type) {
		super(libelle);
		this.type = type;
	}

	@Column(name="tipe")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
}
